# -*- coding: utf-8 -*-
from db.mysql import MysqlClient
from common.helper import Helper
class Arrangement( object ):
    def __init__(self):
        self.mysql = MysqlClient()
        self.name = "“悦享保”个人癌症医疗保障计划"
    def pullData(self, data={}):
        for item in Helper.selectData(self.name, self.mysql):
            data["name"] = self.name
            data["company"] = "中国太平"
            data["year"] = item["year"]
            data["socialSec"] = item["socialSec"]
            data["money"] = "200w"
            data["cancerMedical"] = "0" if item["cancerMedical"] == "0" else "200w"
            data["extSerious"] = "0" if item["extSerious"] == "0" else "100w"
            data["deductible"] = "0" if item["deductible"] == "0" else "1w"
            data["expire"] = item["expire"]
            data["payType"] = item["payType"]
            data["price"] = item["price"]
            Helper.mergeTable(self.name,self.mysql,data )
